import java.util.Objects;
import java.util.Scanner;
class Student{
    private String name;
    private int ID;
    private int javaGrade;
    Student(String name,int ID,int javaGrade){
        this.name=name;
        this.ID= ID;
        this.javaGrade = javaGrade;
    }
    String getname(){
        return name;
    }
    int getID(){
        return ID;
    }
    int getjavaGrade(){
        return javaGrade ;
    }
    public boolean equals(Object other){
        if (this == other){
            return true;
        }
        if (!(other instanceof Student)){
            return false;
        }
        Student student = (Student)other;
        if (!getname().equals(student.getname())){
            return false;
        }
        if (!Objects.equals(getID(), student.getID())){
            return false;
        }
        if (!Objects.equals(getjavaGrade(), student.getjavaGrade())){
            return false;
        }
        return true;
    }
}
public class equals {
    public static void main(String[] args) {
        Student[] students = {
                new Student("king",2018888,2012),
                new Student("king",2018888,2012)
        };
        System.out.println(students[0].equals(students[1]));

}    }
